<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>	
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>简历明细</title>
    <link href="${pageContext.request.contextPath }/static/css/tail.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath }/static/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.js"></script>
    <script>
        function change() {
            var height01 = $(window).height();
            $(".top").css('height', height01 - 35+"px");
        }
    </script>
</head>

<body>
<div class="title"><h2>招聘管理》简历管理》简历登记</h2></div>
<form id="form_demo" >
<div class="top">
    <div>
        <div class="top_out">
            <table class="table" >
                <tbody>
                <tr>
                    <td>应聘职位名称：</td>
                    <td  style="text-align: left"><input type="text"  readonly="readonly" name="rt_post" id="rt_post" value="${res.rt_post }"/></td>
                    <td>应聘职位编码：</td>
                    <td colspan = "3" style="text-align: left"><input type="text"  readonly="readonly" name="rt_positionCode" id="rt_positionCode" value="${res.rt_positionCode}"></td>
                    <td>职位分类：</td>
                    <td colspan = "3" style="text-align: left"><input type="text"  readonly="readonly" class="long_text" name="rt_pclassification" id="rt_pclassification" value="${res.rt_pclassification}"></td>
                </tr>
                	<tr>
                    <td>姓名：</td>
                    <td  style="text-align: left"><input type="text"  readonly="readonly" name="name" id="name" value="${res.name}"></td>
                    <td>性别：</td>
                    <td colspan = "3" style="text-align: left"><select>
        				<option value="0">--请选择--</option>
						<c:choose>
							<c:when test="${res.gender == 0 }">
								<option value="0" selected="selected">男</option>
					    		<option value="1">女</option>
							</c:when>
							<c:otherwise>
								<option value="0">男</option>
					    		<option value="1" selected="selected">女</option>
							</c:otherwise>
						</c:choose>
                    
                    </select>
                    	
                    </td>
                   <td>招聘类型：</td>
                    <td colspan = "2" style="text-align: left"><select>
                    <option value="0">--请选择--</option>
						<c:choose>
							<c:when test="${res.recritmentType == '1' }">
								<option value="1" selected="selected">社会招聘</option>
					    		<option value="2">校园招聘</option>
							</c:when>
							<c:otherwise>
								<option value="1">社会招聘</option>
					    		<option value="2" selected="selected">校园招聘</option>
							</c:otherwise>
						</c:choose>
                    </select></td>
                </tr>
                <tr>
                    <td>EMAIL：</td>
                    <td  style="text-align: left"><input type="text" readonly="readonly" name="email" id="email" value="${res.email }"></td>
                    <td>联系电话：</td>
                    <td colspan = "3" style="text-align: left"><input type="text" readonly="readonly" name="phone" id="phone" value="${res.phone }"></td>
                    <td>户口所在地：</td>
                    <td colspan = "3" style="text-align: left"><input type="text" class="long_text" readonly="readonly" name="raddress" id="raddress" value="${res.raddress }"></td>
                </tr>
                 <tr>
                    <td>住址：</td>
                    <td  style="text-align: left"><input type="text" name="location" id="location" readonly="readonly" value="${res.location }"></td>
                    <td>政治面貌：</td>
                    <td colspan = "3" style="text-align: left"><select name="politics">
                    <option value="0">--请选择--</option>
						<c:choose>
							<c:when test="${res.politics == 1 }">
								<option value="1" selected="selected">群众</option>
					    		<option value="2">团员</option>
							</c:when>
							<c:otherwise>
								<option value="1">群众</option>
					    		<option value="2" selected="selected">团员</option>
							</c:otherwise>
						</c:choose>
                    </select>
                    </td>
                </tr>
                 <tr>
                    <td>身份证号：</td>
                    <td  style="text-align: left"><input type="text" readonly="readonly" name="IDCard" value="${res.IDCard }"></td>
                    <td>毕业院校：</td>
                    <td colspan = "3" style="text-align: left"><input type="text" readonly="readonly" name="graduate" value="${res.graduate }"></td>
                    <td>学历：</td>
                    <td colspan = "3" style="text-align: left"><select name="education" id="education">
                    		<c:if test="${dtList != null }">
						   <option value="0">--请选择--</option>
						   <c:forEach var="dt" items="${dtList}">
						   		<option <c:if test="${dt.id == res.education }">selected="selected"</c:if>
						   		 value="${dt.id}">${dt.educations}</option>
						   </c:forEach>
						</c:if>
                    </select></td>		
                </tr>
                <tr>
                    <td>专业：</td>
                    <td  style="text-align: left"><input type="text" readonly="readonly" name="major" value="${res.major }"></td>
                    <td>工作经验：</td>
                    <td colspan = "3" style="text-align: left"><input type="text" readonly="readonly" name="workExperience" value="${res.workExperience }"></td>
                    <td>薪资要求：</td>
                    <td colspan = "3" style="text-align: left"><input type="text" readonly="readonly" class="long_text" name="demands" value="${res.demands }"></td>
                </tr>
                <tr>
                    
                    <td>是否在职：</td>
                    <td colspan = "3" style="text-align: left"><select name="isoffice">
                    	<option value="0">--请选择--</option>
                    	<c:choose>
							<c:when test="${res.isoffice == 1 }">
								<option value="1" selected="selected">在职</option>
					    		<option value="2">离职</option>
							</c:when>
							<c:otherwise>
								<option value="1">在职</option>
					    		<option value="2" selected="selected">离职</option>
							</c:otherwise>
						</c:choose>
                    </select></td>
                    <td>是否应届毕业生：</td>
                    <td colspan = "3" style="text-align: left"><select name="isgraduate">
                    	<option value="0">--请选择--</option>
                    	<c:choose>
							<c:when test="${res.isgraduate == 1 }">
								<option value="1" selected="selected">是</option>
					    		<option value="2">否</option>
							</c:when>
							<c:otherwise>
								<option value="1">是</option>
					    		<option value="2" selected="selected">否</option>
							</c:otherwise>
						</c:choose>
                    </select></td>
                    <td>登记时间：</td>
                  
                	<td colspan = "3" style="text-align: left"><input type="text" readonly="readonly" id="registrantTiem" name="registraTime" value="<fmt:formatDate value="${res.registraTime}" pattern="yyyy-MM-dd"/>"></td>
                </tr>
                <tr>
	               	<td>个人履历:</td>
	               	<td colspan = "10" style="text-align: left"><input type="text" id="record" name="record" value="${res.record }" style="width: 100%;height: 100px"></td>
	               </tr>
                <tr>
                    <td>简历附件：</td>
                    <td  style="text-align: left"><input type="text" name="attachmen" value="${res.attachmen }">
                    </td>
                		
                		
                </tr>
                 <tr>
                    <td>是否推荐面试：</td>
                     <td colspan = "3" style="text-align: left"><select name="interview">
                   
                       <option value="0">--请选择--</option>
                    	<c:choose>
							<c:when test="${res.interview == 1 }">
								<option value="1" selected="selected">是</option>
					    		<option value="2">否</option>
							</c:when>
							<c:otherwise>
								<option value="1">是</option>
					    		<option value="2" selected="selected">否</option>
							</c:otherwise>
						</c:choose>
                    <td>推荐人：</td>
                    <td colspan = "3" style="text-align: left"><input type="text" readonly="readonly" name="recritmentName" value="${res.recritmentName }"></td>
                    <td>推荐时间：</td>
                    <td colspan = "3" style="text-align: left"><input type="text" class="long_text" readonly="readonly" name="recritmentdate" value="<fmt:formatDate value="${res.recritmentdate}" pattern="yyyy-MM-dd"/>"></td>
                </tr>
                 <tr>
	               	<td>推荐面试意见:</td>
	               	<td colspan = "8" style="text-align: left"><input type="text" id="opinions" name="opinions" value="${ res.opinions}" style="width: 100%;height: 100px"></td>
	               </tr> 
                </tbody>
            </table>
        </div>
    </div>
    <div class="bot_btn">
        <button class="btn btn1"><a href="#" onClick="javascript :history.back(-1);" target="right">返回</a></button>
    </div>
</div>
</form>
</body>
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.js"></script>

<script src="static/js/date/js/laydate.js"></script>
<script>
    var PROJECTID, TASKTYPE, TASKPHASE,  PERSONID
    !function () {
        laydate.skin('danlan');//切换皮肤，请查看skins下面皮肤库
        laydate({ elem: '#registrantTiem' });//绑定元素
        laydate({ elem: '#demo1' });
        laydate({ elem: '#demo2' });//绑定元素
    }();
    function init() {
        if (parent.getCurrentID() != "") {
            $.ajax({
                url: '../TaskRecord/SearchTaskById?taskId=' + parent.getCurrentID(),
                type: 'POST',
                dataType: 'json',
                success: function (result) {
                    var data = result.data;
                    if (data) {
                        PROJECTID = data.PROJECTID
                        PERSONID =data.PERSONID
                        TASKPHASE = data.TASKPHASE;
                        TASKTYPE = data.TASKTYPE;
                        $("#tit").val(data.PROJECTNAME);
                        $("#person").val(data.TASKPHASENAME);

                        $("#demo").val(getFormatTime(data.STARTTIME.substring(6,19)));


                        $("#NOTE").val(data.NOTE);

                    }
                    else {
                        alert("获取失败！");
                    }
                },
                error: function (err) {
                }
            })

        }

    }
    function RecodeSave() {
        $.ajax({
            type: "POST",
            url: "../TaskRecord/UpdateTask",
            data: {
                TASKID: parent.getCurrentID(),
                PROJECTID: PROJECTID,
                STATE: $("#tit").val(),
                STARTTIME: $("#demo").val(),

                PERSONID: PERSONID,
                NOTE: $("#NOTE").val(),
                TASKTYPE: $("#part").val(),
                TASKPHASE: $("#person").val(),

            },
            dataType: "json",
            success: function (result) {
                if (result.data) {
                    alert("保存成功！！！");
                    parent.getRecodeTableData();
                    TaskCancel();
                } else {
                    alert("保存失败！！！")
                }
            }
        })
    }
    function TaskCancel() {
        var index = parent.layer.getFrameIndex(window.name)
        parent.layer.close(index);
    }



    //时间格式化函数
    function getFormatTime(time) {
        var time = new Date(parseInt(time));
        var y = time.getFullYear();
        var m = time.getMonth() + 1;
        var d = time.getDate();
        var h = time.getHours();
        var mm = time.getMinutes();
        var s = time.getSeconds();
        return y + '-' + add0(m) + '-' + add0(d) + ' ' + add0(h) + ':' + add0(mm) + ':' + add0(s);
    }
    function add0(m) { return m < 10 ? '0' + m : m }
</script>

</html>